package org.bugeden.netdisk.json

import java.util.Date

/**
 * Created by IntelliJ IDEA.
 * User: inotseeyou
 * Date: 2010-11-7
 * Time: 15:58:16
 * To change this template use File | Settings | File Templates.
 */

//  {
//    "id":"md5",
//    "modifiedTime":"1986-09-08 00:00:00",
//    "createdTime":"1986-09-11 00:00:00",
//    "createdUser":inotseeyou@gmail.com",
//    "filename":"/test/freedom.txt",
//    "size":1234,
//    "fileType":"dir/file"
//    "tag":"..."
//    "blocks":["id_1","id_2","id_3","..."]
//  }
class FileDescriptor extends AnyRef with Json{
  import FileDescriptor._
  var id = ""
  var secId = ""
  var modifiedTime: Date = new Date
  var createdTime: Date = new Date
  var createdUser = ""
  var filename=""
  var size = 0L
  var fileType = T_FILE
  var tag = ""
  var members = Array[String]()     //maybe blocks, maybe file list
}

object FileDescriptor{
  val T_FILE = "file"
  val T_DIR = "dir"
}